package com.example.springbootshelldemo;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author chaird
 * @create 2021-11-20 19:21
 */
@RestController
public class HelloController {

  @GetMapping("/hello")
  public Object hello() {
    List<String> list = ShellUtils.exceShell("jps -l | grep hbase");
    for (String s : list) {
      System.out.println(s);
    }

    return 1;
  }
}
